package com.scnu.api.admin;

import com.scnu.pojo.AdminUser;
import com.scnu.service.AdminUserService;
import io.swagger.annotations.Api;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;


@RestController
@Api(value = "AdminUser", tags = "系统管理员接口")
@RequestMapping("/adminUser")
public class AdminUserAPI {
    @Resource
    AdminUserService adminUserService;

    private static final Logger logger = LoggerFactory.getLogger(AdminUserAPI.class);

    @RequestMapping(value = "/login", method = RequestMethod.POST)
    public AdminUser login(@RequestParam("userName") String userName, @RequestParam("password") String password){
        return adminUserService.login(userName, password);
    }
}
